const App = getApp();
Component({
  properties: {
    title: {
      type: String,
      value: "标题"
    },
    isShowReturn: {
      type: Boolean,
      value: !0
    },
    path: {
      type: String,
      value: ""
    }
  },
  data: {
    statusBarHeight: "",
    statusBarPadding: "",
  },
  lifetimes: {
    attached: function () {
      this.setData({
        statusBarHeight: App.globalData.navHeight,
      })
      this.setData({
        statusBarPadding: App.globalData.navTop,
      })
    }
  },
  methods: {
    goback: function () {
    /* 退出页面 */
      1 === getCurrentPages().length ? wx.switchTab({
        url: "/pages/index/index"
      }) : wx.navigateBack();
    }
  }
});